package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ImErrorInf generated by hbm2java
 */
@Entity
@Table(name = "IM_ERROR_INF", schema = "IMPRENTAS")
public class ImErrorInf implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7582936935284095808L;
	private ImErrorInfId id;
	private ImMaestroError imMaestroError;
	private DcInfDetalle dcInfDetalle;

	public ImErrorInf() {
	}

	public ImErrorInf(ImErrorInfId id, ImMaestroError imMaestroError,
			DcInfDetalle dcInfDetalle) {
		this.id = id;
		this.imMaestroError = imMaestroError;
		this.dcInfDetalle = dcInfDetalle;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "iindice", column = @Column(name = "I_INDICE", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "ncorrela", column = @Column(name = "N_CORRELA", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "cerror", column = @Column(name = "C_ERROR", nullable = false, length = 3)) })
	public ImErrorInfId getId() {
		return this.id;
	}

	public void setId(ImErrorInfId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_ERROR", nullable = false, insertable = false, updatable = false)
	public ImMaestroError getImMaestroError() {
		return this.imMaestroError;
	}

	public void setImMaestroError(ImMaestroError imMaestroError) {
		this.imMaestroError = imMaestroError;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "I_INDICE", referencedColumnName = "I_INDICE", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "N_CORRELA", referencedColumnName = "N_CORRELA", nullable = false, insertable = false, updatable = false) })
	public DcInfDetalle getDcInfDetalle() {
		return this.dcInfDetalle;
	}

	public void setDcInfDetalle(DcInfDetalle dcInfDetalle) {
		this.dcInfDetalle = dcInfDetalle;
	}

}
